An image forming apparatus, such as a color laser printer, includes a plurality of image forming units arranged along a sheet conveying belt. In the image forming apparatus, toner images of respective colors are transferred onto the sheet to be conveyed on the belt from the respective image forming units. In such an image forming apparatus, if a transfer position shift (color shift) between the image forming units with respect to the sheet occurs, the quality of an image to be formed is deteriorated.
To ensure the quality of the image, there is suggested a technique, called registration, which corrects the shift of a forming position in each color (for example, JP-A-2003-98795). According to this technique, a predetermined pattern is formed on the surface of the belt by each image forming unit, and the position of the pattern is detected by an optical sensor. Then, the forming position in each color is corrected on the basis of the detection result. Similarly, a technique is suggested that a pattern for density correction is formed on the belt, and the pattern is detected by an optical sensor. Then, the density of an image is corrected on the basis of the detection result.
During the above-described position shift correction or density correction, if toner is attached to and contaminates the surface of the belt, pattern detection can not be accurately performed. For this reason, an image forming apparatus is provided with a cleaning device for cleaning the belt. Then, after correction processing ends, the cleaning device removes toner attached to the surface of the belt.
In a related-art image forming apparatus, however, the belt may not be cleaned immediately before correction is performed. That is, even if the belt is cleaned after correction ends, an image forming unit may be detached or attached later, and as a result, the surface of the belt may be contaminated. In this state, if subsequent correction is performed, pattern detection accuracy may be degraded and the quality of the image to be formed may be deteriorated.